package com.songcha.module_task

import android.app.Application
import android.content.Context
import com.alibaba.android.arouter.launcher.ARouter
import com.songcha.library_business.helper.AdvertHelper
import com.songcha.library_business.provider.IApplicationInitProvider
import com.songcha.library_common.BuildConfig
import com.songcha.library_common.LibraryCommon


class ModuleTaskApplication : Application(),IApplicationInitProvider {
    companion object{
        lateinit var mContext:Context

        @JvmStatic
        fun init(application:Application){
            mContext=application
        }
    }

    override fun onCreate() {
        super.onCreate()
        mContext=this
        LibraryCommon.init(this)
        ARouter.openLog()
        ARouter.openDebug()
        ARouter.init(this)

        /*AdvertHelper.initAdvertSdk(this,"5437150",object :TTAdSdk.Callback {
            override fun success() {}
            override fun fail(i: Int, s: String) {}
        })*/

        ModuleTaskApplication.init(this)
    }

    override fun initApplication(application: Application) {
        //init(application)
        ModuleTaskApplication.init(application)
    }

    override fun init(context: Context?) {

    }


}